/* ==================== Doro合影功能样式 ==================== */

/* Doro按钮样式 */
.doro-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 8px;
    transition: all 0.3s;
    cursor: pointer;
    font-weight: 500;
}

.doro-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.doro-btn:active {
    transform: translateY(0);
}

/* Doro模态框 */
.doro-selfie-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: modalSlideIn 0.3s ease-out;
    box-sizing: border-box;
}

.doro-modal-content {
    padding: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.doro-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.doro-close-btn:hover {
    background: #f44336;
    color: white;
    transform: rotate(90deg);
}

/* Doro头部 */
.doro-header {
    padding: 25px 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.doro-header h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.doro-subtitle {
    margin: 10px 0 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Doro主体 */
.doro-body {
    padding: 30px;
}

.doro-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.doro-info h4 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.doro-info p {
    margin: 8px 0 0;
    color: #666;
    font-size: 14px;
}

/* 步骤指示器 */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.step-item.completed .step-number {
    background: #4caf50;
    color: white;
}

.step-label {
    font-size: 14px;
    color: #666;
}

.step-item.active .step-label {
    color: #667eea;
    font-weight: 500;
}

.step-item.completed .step-label {
    color: #4caf50;
}

.step-line {
    position: absolute;
    top: 20px;
    width: calc(33.33% - 40px);
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step-line:nth-of-type(2) {
    left: calc(33.33% + 20px);
}

.step-line:nth-of-type(4) {
    left: calc(66.66% + 20px);
}

/* 上传区域 */
.doro-upload-section {
    margin-bottom: 30px;
}

.upload-step {
    display: none;
    animation: fadeIn 0.3s;
}

.upload-step.active {
    display: block;
}

.upload-step h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.doro-upload-area {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.doro-upload-area:hover {
    background: #e8eaf6;
    border-color: #764ba2;
}

.doro-upload-area input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-text {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.upload-hint {
    color: #999;
    font-size: 14px;
}

.doro-photo-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: none;
    margin: 0 auto;
}

/* Doro选择器 */
.doro-selector {
    margin-top: 20px;
}

.doro-selector-container {
    margin-top: 15px;
}

.doro-selector-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.doro-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.doro-tab {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-weight: 500;
}

.doro-tab.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.doro-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    min-height: 120px;
}

.doro-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s;
    padding: 5px;
    background: white;
    position: relative;
}

.doro-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.doro-item.selected {
    border-color: #667eea;
    transform: scale(1.05);
}

.doro-item.selected::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #667eea;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.doro-item img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: white;
    padding: 4px;
}

.doro-item-name {
    text-align: center;
    font-size: 12px;
    color: #333;
    margin-top: 4px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doro-item-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    min-height: 100px;
    border: 2px dashed #999;
}

.doro-item-custom:hover {
    border-color: #667eea;
    background: #e8eaf6;
}

.no-doros {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 40px;
}

/* 预览区域 */
.doro-preview-section {
    display: none;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.doro-preview-section h4 {
    margin-top: 0;
    color: #333;
}

.doro-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.preview-item {
    text-align: center;
}

.preview-item img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.preview-label {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

/* 选项区域 */
.doro-options {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 12px;
    border: 1px solid #b3d9ff;
}

.doro-options h4 {
    margin-top: 0;
    color: #0066cc;
}

.option-group {
    margin-top: 15px;
}

.option-group label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    color: #333;
}

.option-group input[type="checkbox"],
.option-group input[type="radio"] {
    margin-right: 10px;
}

/* 操作按钮 */
.doro-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
    gap: 15px;
}

.doro-nav-buttons {
    display: flex;
    gap: 10px;
}

.doro-btn-secondary {
    padding: 16px 32px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 120px;
}

.doro-btn-secondary:hover {
    background: #667eea;
    color: white;
}

.doro-btn-primary {
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 150px;
}

.doro-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.doro-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.doro-cancel-btn {
    padding: 16px 32px;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 120px;
}

.doro-cancel-btn:hover {
    background: #dc3545;
    color: white;
}

.doro-back-btn {
    padding: 16px 32px;
    border: 2px solid #6c757d;
    background: white;
    color: #6c757d;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 120px;
}

.doro-back-btn:hover {
    background: #6c757d;
    color: white;
}

.doro-next-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 120px;
}

.doro-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.doro-generate-btn {
    padding: 16px 40px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 150px;
}

.doro-generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.doro-generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.doro-video-btn {
    padding: 16px 40px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 150px;
}

.doro-video-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.doro-video-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 视频结果展示样式 */
.doro-video-result {
    display: none;
    text-align: center;
    padding: 30px;
    max-width: 100%;
    overflow: hidden;
}

.generated-video-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: #000;
}

.generated-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    border-radius: 12px;
    object-fit: contain;
}

.video-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
}

.video-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.video-result-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.download-btn {
    background: #4caf50;
    color: white;
}

.download-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.regenerate-btn {
    background: #ff9800;
    color: white;
}

.regenerate-btn:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.share-btn {
    background: #2196f3;
    color: white;
}

.share-btn:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* 自定义提示词输入框 */
#doroCustomPrompt {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s;
}

#doroCustomPrompt:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#doroCustomPrompt::placeholder {
    color: #999;
    font-style: italic;
}

/* 加载状态 */
.doro-loading {
    display: none;
    text-align: center;
    padding: 60px;
}

.doro-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.doro-loading-text {
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
}

.doro-loading-hint {
    color: #999;
    font-size: 14px;
}

/* 结果展示 */
.doro-result {
    display: none;
    text-align: center;
    padding: 30px;
}

.doro-result-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.doro-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.doro-download-btn {
    padding: 12px 24px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.doro-download-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .doro-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .doro-header {
        padding: 20px;
    }
    
    .doro-header h3 {
        font-size: 24px;
    }
    
    .doro-body {
        padding: 20px;
    }
    
    .step-indicator {
        padding: 0 10px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .doro-selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .doro-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .doro-nav-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .doro-btn-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .doro-upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .doro-selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        max-height: 250px;
    }
    
    .doro-preview-grid {
        grid-template-columns: 1fr;
    }
}


